/*
 * CommandPoser.h
 *
 *  Created on: 2 janv. 2012
 *      Author: jeddi
 */

#ifndef COMMANDPOSER_H_
#define COMMANDPOSER_H_

#include "Command.h"
#include "CommandRobot.h"

class CommandPoser: public Command, public CommandRobot {

public:
	static CommandPoser maCmd;
	Objet ancienObjet;

	CommandPoser(Robot*rob=NULL,string d=(string)"POSER") : CommandRobot(rob), Command(d) {
		ancienObjet = rob->getObjet();
	}

	CommandPoser(string str):Command(str),CommandRobot(){}

	CommandPoser* constVirtual(Robot *rob) {
		return new CommandPoser(rob);
	}
	void executer() {
		r->poser();
	}
	void annuler() {
		r->saisir(ancienObjet);
	}

};



#endif /* COMMANDPOSER_H_ */
